package com.zhihuishu.micro.course.service.impl;

import com.zhihuishu.micro.course.dto.CourseDataDto;
import com.zhihuishu.micro.course.service.CCDataTreenityRedisService;
import com.zhihuishu.toolkit.jedis.JedisHelper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 * table-DATA
 * @author Jiangli
 * @date 2016/12/16 13:15
 */
@Service("ccDataTreenityServiceRedis")
public class CCDataTreenityRedisServiceImpl extends BaseTreenityBatchServiceRedisImpl<CourseDataDto> implements CCDataTreenityRedisService {
    @Override
    public CourseDataDto updateAndGet(CourseDataDto dto, long updateUserId) {
        //无需覆盖
        return null;
    }

    @Override
    public CourseDataDto refreshUniqueName(CourseDataDto dto, long updateUserId) {
        //无需覆盖
        return null;
    }

    @Override
    protected Class<CourseDataDto> getDTOClass() {
        return CourseDataDto.class;
    }

    @Override
    public String getObjectKey(Integer dtoId) {
        return JedisHelper.key("cc:data", dtoId);
    }

    @Override
    public String getIdsKey(long oneToManyId) {
            return JedisHelper.key("cc:folder", oneToManyId, "data");
    }

    @Override
    public List<CourseDataDto> listByFolderIdsFilterDataType(List<Long> folderIds, String dataType) {
        return null;
    }
}
